package com.cans.model.base;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;

/**
 * @author shencan
 * @date 2018/11/2 11:11
 * @description 通用Model, 其它Model层继承该类
 */
public class BaseModel implements Serializable {
    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 最后修改时间
     */
    @TableField(value = "last_change_time", fill = FieldFill.UPDATE)
    private Date lasetChangeTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLasetChangeTime() {
        return lasetChangeTime;
    }

    public void setLasetChangeTime(Date lasetChangeTime) {
        this.lasetChangeTime = lasetChangeTime;
    }
}
